package nc.ui.pr.pr1110;

import java.awt.Container;

import nc.itf.pr.pub.IConstant;
import nc.ui.crmbd.pub.CrmDefaultQueryDlg;
import nc.ui.pr.pub.ref.BdCateGoryRefTreeModel_ALL;
import nc.ui.pub.beans.UIRefPane;
import nc.ui.querytemplate.CriteriaChangedEvent;
import nc.ui.querytemplate.normalpanel.INormalQueryPanel;
import nc.vo.querytemplate.TemplateInfo;

public class RentPactQueryDlgSelf extends CrmDefaultQueryDlg {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public RentPactQueryDlgSelf(Container parent, INormalQueryPanel normalPnl,
			TemplateInfo ti) {
		super(parent, normalPnl, ti);
		
	}

	@Override
	protected void initFieldRef(CriteriaChangedEvent event) {
		super.initFieldRef(event);
		if (event.getFieldCode().endsWith("pk_category")) {
			UIRefPane cgrp = getUIRefPaneByCode(event);
			BdCateGoryRefTreeModel_ALL model = (BdCateGoryRefTreeModel_ALL) cgrp.getRefModel();
			if (model != null && cgrp != null) {
				cgrp.setNotLeafSelectedEnabled(false);
				model.setStrBillType(IConstant.CATEGORYCONTROLLERPOINT[1]);
				cgrp.setRefModel(model);
			}
		}
	}
}
